This invention relates generally to optical encoders used for sensing the movement and position of a moveable member relative to a fixed reference. More particularly, this invention relates to digital automatic gain control and position sensing circuitry and methods which increase the accuracy and reliability of an optical encoder while eliminating the need to calibrate or trim the encoder manually in a manufacturing step.
Optical position encoders capable of converting mechanical relative position into electrical signals are known in the art. Such devices are commonly employed as position sensors in servomechanisms such as those used for positioning print wheels in printers or read/write heads in rotating disk data storage devices, such as described in the common assignee's U.S. Pat. No. 4,396,959.
Optical encoders generally comprise one or more light sources, a photodetector array with a plurality of photodetectors, a fixed mask, and a moveable scale. The moveable scale operates in concert with the fixed mask and the light source(s) to produce one or more light beams which alternate continuously between minimum and maximum intensity with the movement of the scale. Each light beam is directed towards a photodetector which translates the varying light pattern into a correspondingly varying electrical signal. In a polyphase encoder, the phase of a signal produced by a given photodetector relative to a signal produced by another photodetector of the array is determined by the relative positions of the light transmissive slots in the fixed mask over the photodetectors. The frequency and/or slope of the signals can be used to ascertain the speed at which the scale is moving, and the signal amplitude values can be monitored to determine scale position relative to the mask.
An initial problem which must be overcome in all polyphase optical encoders is the variation in minimum and maximum electrical signal characteristics among the plurality of photodetectors as they are installed. The signal put out by each photodetector will be influenced by at least three factors: variations in ambient operating temperature, the individual electrical characteristics of each photodetector, and the amount of light which reaches each photodetector. The latter factor will vary with the physical installation of the light source(s) and, if more than one light source is employed, with the light emitting characteristics of each source.
In one prior patent, U.S. Pat. No. 4,224,514, to Weber et al. describing an optical encoder, the initial variations in electrical signals are eliminated following assembly of the encoder by using a laser trimmed preamplifier. A thick film resistor, used to control the gain of a separate preamplifier for each photodetector, is suitably trimmed to adjust the peak signal put out to a predetermined level. Variations produced by multiple light sources are eliminated in this apparatus by an arrangement which requires that a single light source be used.
Each unit produced according to this prior design must undergo an adjustment step following assembly, and the adjustment becomes a fixed operating characteristic of each unit so produced. It will thus be appreciated that an optical encoder which is self-trimming would have the double advantage of eliminating the intial adjustment step and providing for continued accuracy of the encoder over the useful life of the components. This is a salient contribution of the present invention.
A second problem to overcome in optical encoders is the variation in minimum and maximum electrical signals caused not by movement but by the stress of operation. Specifically, the light output of an LED light source will generally drop as the apparatus within which the light source is installed warms to operating temperature, causing a corresponding drop in photodetector output of e.g. 20%. This problem is most pronounced when the optical encoder output is relied upon by the control circuits of a servomechanism to hold the servomechanism at a given position, since any signal variation will be interpreted as relative movement. One method is disclosed in the above described Weber et al. patent, wherein the moveable scale, the mask, and the photodetectors are arranged so as to cause the electrical signals always to sum to a constant value. The output of the light source can then be regulated by automatic gain control (AGC) circuitry to maintain the summed signal within tolerance of a reference value. This solution, however, does not compensate for individual variations in the photodetector signals which may develop over time, and may require multiple photodetectors (for the summing effect) to produce one signal.
A different AGC capability is disclosed in U.S. Pat. No. 3,806,254, to Ha and Ruble, et al., wherein an apparatus is described which provides AGC for both the minimum and maximum peaks of the electrical signal produced by an individual photodetector. This technique employs two reference signals corresponding to the nominal minimum and maximum values of the photodetector signal, and a switching means used to select the proper reference signal for the AGC function at the proper time. The minimum peak approaches but never reaches a zero value, thus providing for a positive AGC even at the minumum signal peaks. The AGC function is effectively inoperative between signal peaks, however, rendering this design useful only for applications which rely solely on signal peaks for position information. Continuous, individual AGC over the entire waveform of each signal produced by the photodetectors of an optical encoder would render intermediate signal values useful as a source of continuous position information as well. Such continuous AGC is a second contribution of the present invention.